package c.h.a;

import android.util.Log;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.view.View.OnTouchListener;
import b.p.b.q;
import com.liuzh.deviceinfo.MainActivity.g;
import com.liuzh.deviceinfo.MainActivity.g.a;
import java.util.Objects;

/* compiled from: lambda */
public final /* synthetic */ class e implements OnTouchListener {
    public final /* synthetic */ a a;

    public /* synthetic */ e(a aVar) {
        this.a = aVar;
    }

    public final boolean onTouch(View view, MotionEvent motionEvent) {
        a aVar = this.a;
        Objects.requireNonNull(aVar);
        if (motionEvent.getAction() == 0) {
            q qVar = g.this.d;
            String str = "ItemTouchHelper";
            if (((qVar.m.d(qVar.r, aVar) & 16711680) != 0 ? 1 : null) == null) {
                Log.e(str, "Start drag has been called but dragging is not enabled");
            } else if (aVar.a.getParent() != qVar.r) {
                Log.e(str, "Start drag has been called with a view holder which is not a child of the RecyclerView which is controlled by this ItemTouchHelper.");
            } else {
                VelocityTracker velocityTracker = qVar.t;
                if (velocityTracker != null) {
                    velocityTracker.recycle();
                }
                qVar.t = VelocityTracker.obtain();
                qVar.i = 0.0f;
                qVar.h = 0.0f;
                qVar.r(aVar, 2);
            }
        }
        return true;
    }
}
